package knowledgeTest;

/**
 * @Author Jeremy Zheng
 * @Date 2021/2/28 23:43
 * @Version 1.0
 */
public class ExtendText {

    public static void main(String[] args) {
        WhiteDog whiteDog = new WhiteDog();
        whiteDog.printColor();
    }

}

class Dog{
    public String color;

    public void printColor(){
        System.out.println(this.color);
    }
}

class WhiteDog extends Dog{
    public String color="white";

    @Override
    public void printColor() {
        System.out.println(this.color);
    }
}
